package cn.ucox.web.ms.components.ftp;

import org.apache.commons.net.ftp.FTP;

/**
 * FTP客户端配置
 *
 * @author chenw
 * @create 2017-06-09 13:59
 * @email javacspring@gmail.com
 */
public class FtpConfig {

    private String host;
    private int port;
    private String userName;
    private String password;
    private int connectTimeout = 600000;//600s
    private boolean passiveMode;//passive模式
    private int transferFileType = FTP.ASCII_FILE_TYPE;
    private String encoding = "UTF-8";
    private int poolSize = 5/*Runtime.getRuntime().availableProcessors() * 5*/;
    private int maxPoolSize = poolSize * 2;
    private int segmentSize = 512000;//512K

    public int getConnectTimeout() {
        return connectTimeout;
    }

    public void setConnectTimeout(int connectTimeout) {
        this.connectTimeout = connectTimeout;
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public boolean isPassiveMode() {
        return passiveMode;
    }

    public void setPassiveMode(boolean passiveMode) {
        this.passiveMode = passiveMode;
    }

    public int getTransferFileType() {
        return transferFileType;
    }

    public void setTransferFileType(int transferFileType) {
        this.transferFileType = transferFileType;
    }

    public String getEncoding() {
        return encoding;
    }

    public void setEncoding(String encoding) {
        this.encoding = encoding;
    }

    public int getPoolSize() {
        return poolSize;
    }

    public void setPoolSize(int poolSize) {
        this.poolSize = poolSize;
    }

    public int getMaxPoolSize() {
        return maxPoolSize;
    }

    public void setMaxPoolSize(int maxPoolSize) {
        this.maxPoolSize = maxPoolSize;
    }

    public int getSegmentSize() {
        return segmentSize;
    }

    public void setSegmentSize(int segmentSize) {
        this.segmentSize = segmentSize;
    }
}